package com.itheima.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

@Data
@TableName("tbl_product") //绑定表关系
public class Product {

    @TableId(type=IdType.AUTO)  //主键自增 如果不设置 就用了雪花算法
    private Long id;
    @TableField("product_name")
    private String pname;  // product_name
    private String brand;
    private Double price;
    private Integer num;
    private Integer online;
    private Date createTime;
    private Date lastUpdateTime;
    private Integer version;
    private Integer deleted;

    @TableField(exist = false)
    private String  brandName;

}
